<?php
	error_reporting(E_ALL ^ E_NOTICE);
	ini_set('display_errors','On');

	if (isset($_POST["PHPSESSID"])) {
		session_id($_POST["PHPSESSID"]);
	} else if (isset($_GET["PHPSESSID"])) {
		session_id($_GET["PHPSESSID"]);
	}
	session_start();
	
	//Base URL
	defined('BASE_URL') || define('BASE_URL', preg_replace('/^\/$/is','', dirname($_SERVER['PHP_SELF']) ) );
	defined('ROOT') || define('ROOT', dirname(__FILE__) );

	//create a application with zone
	set_include_path(ROOT.'/lib');
	require_once 'App.php';
	$app = new Zone_App( BASE_URL );
	$app
		->bootstrap()
		->run();
?>